import { Vector2, Path } from 'three';
export class CreateMeta {
    t: number;
    f: Array<number>;
    b: Array<number>;
    holeMeta: HoleMeta;

    constructor(t, f, b, hm) {
        this.t = t;
        this.f = f;
        this.b = b;
        this.holeMeta = hm;
    }
}

export class HoleMeta {
    /** 开洞的方向 */
    dir: string;
    /** 顺序规则*/
    hs: Array<number>;
    /** 开孔半径*/
    r: number;
    /** 路径*/
    x: number;
    /** path*/
    path: Array<Path>;

    extra: Array<number>;

    constructor(r = 0.25, x = 0.25, hs = [1, 3], dir = "y", path = null, extra = null) {
        this.dir = dir;
        this.hs = hs;
        this.r = r;
        this.x = x;
        this.path = path;
        this.extra = extra;
    }
}


export class NodeLink {
    data: Array<number>;
    last: NodeLink;
    next: NodeLink;

    constructor(data, last, next) {
        this.data = data;
        this.last = last;
        this.next = next;
    }
}

/**
 * 角铝画弧用到的参数类
 */
export class AluRadiusMeta {
    /** 圆心*/
    center: Vector2;
    /** 外弧画弧角度*/
    o_arc_deg: number;
    /** 外弧旋转角度*/
    o_arc_r_deg: number;

    /** 内弧半径*/
    inner_arc_radius: number;
    /**内弧画弧角度*/
    i_arc_deg: number;
    /** 内弧旋转角度*/
    i_arc_r_deg: number;

    constructor(c, od, ord, ir, id, ird) {
        this.center = c;
        this.o_arc_deg = od;
        this.o_arc_r_deg = ord;
        this.inner_arc_radius = ir;
        this.i_arc_deg = id;
        this.i_arc_r_deg = ird;
    }
}